package com.ostrich.note.ui.note.viewmodel;

import com.ostrich.note.entity.BaseResponseEntity;
import com.ostrich.note.ui.note.entity.NoteEntity;
import com.ostrich.note.ui.note.repository.NoteRepository;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;


public class NoteDetailViewModel extends ViewModel {
    private NoteRepository mNoteRepository = new NoteRepository();
    //笔记详情
    public LiveData<BaseResponseEntity<NoteEntity>> subclassDetailData(int note_type_id){
        return mNoteRepository.subclassDetailData(note_type_id);
    }
    //笔记收藏
    public LiveData<BaseResponseEntity> notepadCollect(int note_type_id,int collect){
        return mNoteRepository.notepadCollect(note_type_id,collect);
    }

    public LiveData<BaseResponseEntity> notepadSubclassDel(int note_type_id){
        return mNoteRepository.notepadSubclassDel(note_type_id);
    }
    //笔记修改
    public LiveData<BaseResponseEntity> subclassDataEdit(String thumb,String title ,long create_time, String content,int scrawl,int type_id,int note_type_id){
        return mNoteRepository.subclassDataEdit(thumb, title, create_time, content, scrawl, type_id,note_type_id);
    }
}
